import React, { Component } from 'react';
import DomeChild1 from './Child1'
class  DemoParent  extends Component {
    state = { 
        role:'admin',
        userinfo:{
            name:'lisi',
            age:20
        }
     } 
    render() { 
        console.log(this);
        return (<div className='parent'>
            <h2>7.1父传子</h2>
            <DomeChild1 role={this.state.role} userinfo={this.state.userinfo}/>
        </div>);
    }
}
 
export default DemoParent ;